<!DOCTYPE HTML>
<html>
<head>
<title>用户管理</title>
<include file="Common@Common/_meta" />
<style>
    #userList span{
        width:143px;
    }
    #userList span:hover{
        background-color: #8fd9e0;
    }
</style>
</head>
<body>
<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-article-add">   
        
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">用户头像</label>
			<div class="formControls col-xs-8 col-sm-9">
                <img src="{sp:C('imgHost')}{sp$ret['sTouXiang']}"/>
			</div>
		</div>
        
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">用户名</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text valid" value="{sp$ret['sUserName']}" <if condition="$ret['sUserName'] neq ''">readonly</if> placeholder="请填用户名" name="sUserName"  style="width:336px;"/>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">密码</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text valid" value="" placeholder="" name="sPassWord"  style="width:336px;"/>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">确认密码</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text valid" value="" placeholder="" name="sPassWord2"  style="width:336px;"/>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">真实姓名</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text valid" value="{sp$ret['sXingMing']}" placeholder="请填真实姓名" name="sXingMing"  style="width:336px;"/>
            </div>
        </div>
        
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">联系电话</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text valid" value="{sp$ret['sDianHua']}" placeholder="请填电话" name="sDianHua"  style="width:336px;"/>
            </div>
        </div>
        
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">常用邮箱</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text valid" value="{sp$ret['sMail']}" placeholder="请填常用邮箱" name="sMail"  style="width:336px;"/>
            </div>
        </div>
        
        <!--
            <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">所在媒体</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text valid" value="{sp$ret['sMeiTi']}" placeholder="请填所在媒体" name="sMeiTi"  style="width:336px;"/>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">职位</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text valid" value="{sp$ret['sZhiWei']}" placeholder="请填所在媒体" name="sZhiWei"  style="width:336px;"/>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">关注领域</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text valid" value="{sp$ret['sGuanZhuLingYu']}" placeholder="请填关注领域" name="sGuanZhuLingYu"  style="width:336px;"/>
            </div>
        </div>

        <if condition="$ret['sType'] eq '机构'">
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-3">所在部门</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" class="input-text valid" value="{sp$ret['sBuMen']}" placeholder="请填所在部门" name="sBuMen"  style="width:336px;"/>
                </div>
            </div>
        </if>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">申请认证类型</label>
            <div class="formControls col-xs-8 col-sm-9">
                {sp$ret['sShenQingType']}
                
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">类型</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="radio" name="sType"  value="记者" <if condition="$ret['sType'] eq '媒体'">checked="checked</if> id="sType1" /><label for="sType1">媒体</label> 
                <input type="radio" name="sType"  value="企业" <if condition="$ret['sType'] eq '企业'">checked="checked</if> id="sType2" /><label for="sType2">企业</label>

            </div>
        </div>

        <if condition="$ret['sType'] eq '企业'">
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-3">企业名称</label>
                <div class="formControls col-xs-8 col-sm-9">
                    {sp$ret['sQiYeMingCheng']}
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-3">职务</label>
                <div class="formControls col-xs-8 col-sm-9">
                    {sp$ret['sZhiWei']}
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-3">公司简介</label>
                <div class="formControls col-xs-8 col-sm-9">
                    {sp$ret['sGongShiJianJie']}
                </div>
            </div>
        </if>
        -->
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 立即发布</button>
			</div>
		</div>
        <input type="hidden" name="id" value="{sp$ret['id']}" />
        <textarea id="content" style="display:none;">{sp:htmlspecialchars_decode($ret["sContent"])}</textarea>
	</form>
</article>
<include file="Common@Common/_footer" />
<script type="text/javascript" src="__PUBLIC__/lib/jquery/jquery.form.js"></script>  
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/jquery.validate.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/messages_zh.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/icheck/jquery.icheck.min.js"></script>



<script language="javascript">
var ue;
$(document).ready(function(e) {
	
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '10%'
    });	
	
	$("#form-article-add").validate({
		rules:{
			sTitle:{
				required:true,
				minlength: 2,
				maxlength: 50,
			}
		},
		messages : {
			subject : {
				required : "请输入资讯主题",
				minlength : "资讯主题最短2位字符",
				maxlength : "资讯主题不超过50位字符"
			}
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){            
			$(form).ajaxSubmit({
				type:"post",  //提交方式  
				dataType:"json", //数据类型  
				url:"{sp:U('API/Users/addUsers')}", //请求url  
				success:function(ret){ //提交成功的回调函数
					if(ret.status){
						layer.msg(ret.msg,{icon: 6,time:2000});  
						setTimeout(function(){
							layer_close(1);
						},2000);
					}else{
						layer.msg(ret.msg,{icon: 0,time:2000});
					}
				}
			});
		}
    });
});

</script>
</body>
</html>